{template admin/header}

<script src="static/js/date/WdatePicker.js" type="text/javascript"></script>
<script src="static/js/topicManage.js" type="text/javascript"></script>

<div class="nav3"> 
    <ul class="cc">   
        <li {if $_type=='all'}class="current"{/if}> <a href="admin.php?mod=topic&code=topic_manage&_type=all">  微博管理</a> </li>   
        <li {if $_type=='pic'}class="current"{/if}> <a href="admin.php?mod=topic&code=topic_manage&_type=pic">  图片管理</a> </li>   
        <li {if $_type=='video'}class="current"{/if}> <a href="admin.php?mod=topic&code=topic_manage&_type=video">  视频管理</a> </li>  
    </ul> 
</div>
<div class="mt10">
    <form action="admin.php" method="get" name="search">
        <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
            <tr class="header">
                <td colspan="4">搜索微博</td>
            </tr>
            <tr>
                <td class="altbg1" width="80">
                    关键词语:
                </td>
                <td class="altbg2">
                    <input type="text" name="keyword" value="{$keyword}" size="30">		
                </td>
                <td class="altbg1">
                    微博ID:
                </td>
                <td class="altbg2">
                    <input name="tid" type="text" id="tid" value="{$tid}" size="30">多个ID用空格隔开
                </td>
            </tr>
            <tr>
                <!-- <td class="altbg1">
                用户:
                </td>
                <td class="altbg2">
                <input name="username" type="text" id="username" value="{$username}" size="30">		
                </td> -->
                <td class="altbg1">
                    用户昵称:
                </td>
                <td class="altbg2">
                    <input name="nickname" type="text" id="nickname" value="{$nickname}" size="30" onkeyup="ajax_nickname(this, this.value);" autocomplete="off">		
                </td>
                <td class="altbg1">主题类型</td>
                <td class="altbg2">
                    <select name="topic_type">
                        <option value="">请选择...</option>
                        <option value="0" $topic_type_arr[0]>微博</option>
                        <option value="1" $topic_type_arr[1]>活动</option>
                        <option value="2" $topic_type_arr[2]>文章</option>
                    </select>
                </td>

            </tr>
            <tr>
                <td class="altbg1">
                    发布时间:
                </td>
                <td class="altbg2">
                    <input type="text" id="timefrom" name="timefrom" value="{$timefrom}" readonly onFocus="WdatePicker({startDate: '%y-%M-%d 00:00:00', dateFmt: 'yyyy-MM-dd HH:mm', alwaysUseStartDate: true})"/>
                    &nbsp;&nbsp;至&nbsp;&nbsp;
                    <input type="text" id="timeto" name="timeto" value="{$timeto}" readonly onFocus="var fromt = document.getElementById('timefrom').value;
                            WdatePicker({startDate: '%y-%M-%d 00:00:00', dateFmt: 'yyyy-MM-dd HH:mm', alwaysUseStartDate: true, minDate: fromt})"/>
                </td>
                <td class="altbg1">内容类型：</td>
                <td class="altbg2">
                    <select name="type">
                        <option value="">请选择...</option>
                        <option value="first" $type_arr[first]>首发</option>
                        <option value="forward" $type_arr[forward]>转发</option>
                        <option value="reply" $type_arr[reply]>评论</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="altbg1" width="80">&nbsp;
                </td>
                <td class="altbg2">
                    <button name="do" value='' type="submit" class="button">搜索指定</button>
                    &nbsp;
                    <button class="button" type="button" onclick="window.location.href = 'admin.php?mod=topic&code=$this->Code';
                            return false;">查看全部微博</button>
                    <input type="hidden" id="code" name="code" value="{$this->Code}">
                    <input name="mod" type="hidden" value="topic">
                    <input name="_type" type="hidden" value="{$_type}">
                    <input name="per_page_num" type="hidden" value="{$per_page_num}">
                </td>
                <td class="altbg2"></td>
                <td class="altbg2"></td>
            </tr>

        </table>
    </form>

    <form name="manageform" method="post" action="$action">
        <div class="Ptitle">
            <span>批量预选处理结果：</span>
            <label title="允许微博正常显示"><input type="radio" id="show" name="acttype" onclick="setactall(this.form, 1);">显示</label>
<!--            <label title="允许显示，但禁止评论和转发"><input type="radio" id="stop" name="acttype" onclick="setactall(this.form, 2);">禁止</label>
            <label title="允许显示，但禁止转发"><input type="radio" id="stop" name="acttype" onclick="setactall(this.form, 8);">禁转</label>
            <label title="允许显示，但禁止评论"><input type="radio" id="stop" name="acttype" onclick="setactall(this.form, 9);">禁评</label>
            <label title="把微博放到待审核中"><input type="radio" id="si" name="acttype" onclick="setactall(this.form, 3);">待审</label>-->
            <label title="把微博删除到回收站"><input type="radio" id="del" name="acttype" onclick="setactall(this.form, 4);">删除</label>
        </div>
        <script type="text/javascript">
            function setactall(form, type) {
                for (var i = 0; i < form.elements.length; i++) {
                    var e = form.elements[i];
                    if (e.name.match('managetype') && e.value == type) {
                        e.checked = ' checked ';
                    }
                }
            }
        </script>
        <div class="PcomBox">
            <ul class="followList" style="overflow:hidden">
                <!--{loop $topic_list $key $topic}-->
                <li>
                    <div class="fBox_l" style="margin-top:13px"><img src="{$topic[face]}"/> </div>
                    <div class="fBox_R3">
                        <p class="utitle2">
                            <span>
                                <b>{$topic[nickname]}</b>&nbsp;&nbsp;
                                <span>ID：{$topic[tid]}</span>
                                <!--{if $topic[type] == 'reply'}--><span style="color:gray"><a href="admin.php?mod=topic&amp;code=topic_reply&amp;tid={$topic[tid]}">[回复]</a>&nbsp;&nbsp;</span><!--{/if}-->
                                <a href="admin.php?mod=topic&amp;code=modifylist&amp;tid={$topic[tid]}">[编辑]</a>&nbsp;&nbsp;
                                <!--<A href="javascript:void(0);" onclick="sendemailtoleader('$topic[uid]', '$topic[tid]', 'topic');" title="给领导发邮件">[上报]</A>&nbsp;&nbsp;-->
                                <!--<A href="javascript:void(0);" onclick="force_out('$topic[uid]');" title="禁言或者禁止登录，可在用户管理中解封">[封杀此用户]</A>-->
                            </span>
                            <!--{if $topic[type] == 'reply'}--><span style="color:gray">此内容是评论</span><!--{/if}-->
                            
                            <span style="float: right"><!--{echo my_date_format($topic[lastupdate],'Y-m-d H:i:s')}--></span>
                        </p>
                        <p class="utitle2">
                            {$topic[title]}
                        </p>
                        <p class="utitle2">
                            {$topic[describe]}
                        </p>
                        <span>
                            <!--{if $topic[topic_type] == '0'}-->
                            {$topic[content]}
                            <!--{/if}-->
                            <!--{if $topic[attachid] && $topic[attach_list]}-->
                            {loop $topic[attach_list] $iv}
                            <img src="{$iv[attach_img]}" width="32" border="0"/><a href="{$iv[attach_file]}" target="_blank">{$iv[attach_name]}</a>({$iv[attach_score]}分)
                            {/loop}
                            <!--{/if}-->
                            <!--{if $topic[imageid] && $topic[image_list]}-->
                            {loop $topic[image_list] $iv}
                            <a href="{$iv[image_original]}" target="_blank"><img src="{$iv[image_small]}" width="100" border="0" /></a>
                            {/loop}
                            <!--{/if}-->


                            <!--{if $topic[videoid]}-->                 
                            <div class="feedUservideo">
                                <a onClick="javascript:showFlash('{$topic[VideoHosts]}', '{$topic[VideoLink]}', this, '{$topic[VideoID]}');" >
                                    <div id="play_{$topic[VideoID]}" class="vP"><img src="static/image/feedvideoplay.gif"  /></div>
                                    <img src="{$topic[VideoImg]}" style="border:none; width:130px; "/>
                                </a>
                            </div>
                            <!--{/if}-->


                            <!--{if $topic[musicid]}-->
                            <!--{if $topic[xiami_id]}-->
                            <div class="feedUserImg"><embed width="257" height="33" wmode="transparent" type="application/x-shockwave-flash" src="http://www.xiami.com/widget/0_{$topic[xiami_id]}/singlePlayer.swf"></embed></div>
                            <!--{else}-->
                            <div class="feedUserImg"><div id="play_{$topic[MusicID]}"></div><img src="static/image/music.gif" title="点击播放音乐" onClick="javascript:showFlash('music', '{$topic[MusicUrl]}', this, '{$topic['MusicID']}');" style="cursor:pointer; border:none;" /> </div>
                            <!--{/if}-->
                            <!--{/if}-->
                            <!--{if $topic[root_topic][content]}-->
                            //[原微博]<a href="index.php?mod=share&id={$topic[root_topic][tid]}" target="_blank"><!--{if $topic[root_topic][title] != ''}-->{$topic[root_topic][title]}<!--{else}-->{$topic[root_topic][content]}<!--{/if}--></a>
                            <!--{/if}-->
                        </span>
                        <p>
                            <!--                            <span>$topic[from_html]</span>-->
                            
                            <span style="float: right">

                                
                                <input type="text" style="width:25px" name="managetypescore[$key]" value="" title="对当前微博进行积分增减操作(范围:-100至100)"/>
                                <script type="text/javascript">
                                    $("input[name='managetypescore[$key]']").bind('change', function() {
                                        var inputv = $("input[name='managetypescore[$key]']").val();
                                        var inputa = $("a#tcd-{$key}").attr("href");
                                        $("a#tcd-{$key}_1").attr("href", $("a#tcd-{$key}_1").attr("href") + "&score=" + inputv);
                                        $("a#tcd-{$key}_2").attr("href", $("a#tcd-{$key}_2").attr("href") + "&score=" + inputv);
                                        $("a#tcd-{$key}_8").attr("href", $("a#tcd-{$key}_8").attr("href") + "&score=" + inputv);
                                        $("a#tcd-{$key}_9").attr("href", $("a#tcd-{$key}_9").attr("href") + "&score=" + inputv);
                                        $("a#tcd-{$key}_3").attr("href", $("a#tcd-{$key}_3").attr("href") + "&score=" + inputv);
                                        $("a#tcd-{$key}_4").attr("href", $("a#tcd-{$key}_4").attr("href") + "&score=" + inputv);
                                    });

                                </script>
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][1]} value="1" >
                                <a id="tcd-{$key}_1" href="admin.php?mod=topic&code=domanage&type=1&tid={$key}" title="通过审核，显示在微博页面">显示&nbsp;</a>
<!--                                
                                {if $topic[type] != 'reply'}
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][2]} value="2">
                                <a id="tcd-{$key}_2" href="admin.php?mod=topic&code=domanage&type=2&tid={$key}" title="允许显示，但禁止评论和转发">禁止&nbsp;</a>
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][8]} value="8">
                                <a id="tcd-{$key}_8" href="admin.php?mod=topic&code=domanage&type=8&tid={$key}" title="允许显示，但禁止评论和转发">禁转&nbsp;</a>
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][9]} value="9">
                                <a id="tcd-{$key}_9" href="admin.php?mod=topic&code=domanage&type=9&tid={$key}" title="允许显示，但禁止评论和转发">禁评&nbsp;</a>				 
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][3]} value="3">
                                <a id="tcd-{$key}_3" href="admin.php?mod=topic&code=domanage&type=3&tid={$key}" title="转到待审微博中，发布者自己可见">待审&nbsp;</a>
                                {/if}
                                -->
                                <input type="radio" name="managetype[$key]" {$topic[manage_type][4]} value="4">
                                <a id="tcd-{$key}_4" href="admin.php?mod=topic&code=domanage&type=4&tid={$key}" title="删除到回收站">删除&nbsp;</a>
                            </span>
                        </p>
                    </div>
                </li>
                <!--{/loop}-->
            </ul>
            <!--{if $page_arr[html]}-->
            <ul>
                <li class="altbg3" >
                    {$page_arr[html]}
                </li>
            </ul>
            <!--{/if}-->
            <!-- <ul>
              <li class="altbg3" >
                    <span style="color:#D94446">*注：</span>
                    <span>
                            1、显：正常显示；
                            2、止：禁止该微博的评论和转发；
                            3、私：只有发布者可见（在微博审核的待审核中可见）；
                            4、删：删除（留记录，在微博审核的回收站中可见）。</span>
              </li>
        </ul> -->
        </div>
        <center>
            <input class="button" type="submit" id="cronssubmit" name="cronssubmit" value="提交" title="CTRL+ENTER提交">
        </center>
    </form>
</div>
<script type="text/javascript">
    document.onkeydown = function(event) {
        event = event || window.event;
        if (event.ctrlKey == true && event.keyCode == 13) {
            $("#cronssubmit").click();
        }
    }
</script>

    
